package com.societyGames.faceExercises
{
public class PointAtFaceAction extends FadeImageAction
{
  private var _faceDataRender:FaceDataRender;
  private var _showSad:Boolean;

  public function PointAtFaceAction(faceDataRender:FaceDataRender, showSad:Boolean, duration:Number)
  {
    this._faceDataRender = faceDataRender;
    _showSad = showSad;

    super(faceDataRender.pointImage, 1, duration);
  }

  public override function startAction():void
  {
    this._faceDataRender.pointImage.visible = true;
    this._faceDataRender.pointImage.alpha = 0;
    super.startAction();
  }

  override protected function onComplete():void
  {
    if (_showSad)
    {
      this._faceDataRender.showSad();
    }
    super.onComplete();
  }
}
}